package com.hook3.pianke.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.Toast;

import com.hook3.pianke.R;

/**
 * 注册页面
 * Created by chai on 2015/12/10.
 */
public class LoginActivity extends Activity {
    private ImageView activity_iv_photo;
    private RadioGroup group_sex;
    private RadioButton regis_sex_male_btn;
    private RadioButton regis_sex_female_btn;
    private EditText regist_name_et;
    private EditText regist_email_et;
    private EditText regist_password_et;
    private Button activity_go_button;
    private ImageButton activity_left_finish;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        initView();

    }

    private void initView() {
        activity_iv_photo = (ImageView) findViewById(R.id.activity_iv_photo);
        group_sex = (RadioGroup) findViewById(R.id.group_sex);
        regis_sex_male_btn = (RadioButton) findViewById(R.id.regis_sex_male_btn);
        regis_sex_female_btn = (RadioButton) findViewById(R.id.regis_sex_female_btn);
        regist_name_et = (EditText) findViewById(R.id.regist_name_et);
        regist_email_et = (EditText) findViewById(R.id.regist_email_et);
        regist_password_et = (EditText) findViewById(R.id.regist_password_et);
        activity_go_button = (Button) findViewById(R.id.activity_go_button);
        activity_left_finish = (ImageButton) findViewById(R.id.activity_left_finish);
        activity_iv_photo.setOnClickListener(new MyLoginOnClickLinster());
        activity_go_button.setOnClickListener(new MyLoginOnClickLinster());
        activity_left_finish.setOnClickListener(new MyLoginOnClickLinster());

    }

    private class MyLoginOnClickLinster implements View.OnClickListener {
        @Override
        public void onClick(View v) {
            switch (v.getId()){
                case R.id.activity_iv_photo:

                    break;
                case R.id.group_sex:

                    break;
                case R.id.regis_sex_male_btn:

                    break;
                case R.id.regis_sex_female_btn:

                    break;
                case R.id.activity_go_button:
                    Toast.makeText(LoginActivity.this,"注册完成",Toast.LENGTH_SHORT).show();
                    finish();

                    break;
                case R.id.activity_left_finish:
                    finish();

                    break;
                default:
                    break;
            }
        }
    }
}
